import { request } from '@/utils/request';
/**
 * @description 获取表单分类列表
 * @returns
 */
export function getFormSortList() {
  return request({
    url: '/api/form/formSortList',
    method: 'get',
  });
}

/**
 * @description 删除表单分类
 * @returns
 */
export function deleteFormSort(data: API.DelFormSortParams) {
  return request(
    {
      url: '/api/form/deleteFormSort',
      method: 'post',
      data,
    },
    {
      successMsg: '删除成功',
    },
  );
}

/**
 * @description 创建表单分类
 * @returns
 */
export function createFormSort(data: API.AddDictParams) {
  return request({
    url: '/api/form/addFormSort',
    method: 'post',
    data,
  });
}

// 编辑表单分类
export function editFormSort(data: API.UpdateFormSortParams) {
  return request({
    url: '/api/form/updateFormSort',
    method: 'post',
    data,
  });
}
